﻿@model Order
@using Logistics.Web.Models.Order
@using Nop.Core.Domain.Orders

<div class="order-list-shipments" data-id="@Model.Id">
    <table class="table table-hover table-striped">
        <thead>
            <tr><th>Tracking Number</th><th>Notes</th><th>Attributes</th><th>Shipping Label</th></tr>
        </thead>
        <tbody>
            @foreach (var shipment in Model.Shipments.Where(s => !String.IsNullOrEmpty(s.TrackingNumber)))
            {
                <tr class="order-shipment-row" data-url="@Url.Action("Details", "Shipment")" data-id="@shipment.Id" data-name="ShipmentId" data-value="@shipment.Id" data-name2="isOrderDetails" data-value2="true"><td>@shipment.TrackingNumber</td><td>@shipment.Comment</td><td>@shipment.Attributes</td><td>@Html.ActionLink("Download", "DownloadWaybill", "Order", new { shipmentId = shipment.Id }, new { @class = "btn btn-primary download-waybill", target = "_blank" })</td></tr>
            }
        </tbody>

    </table>
</div>